package com.example.demo.controller;

import com.example.demo.common.ResultAjax;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-06-03
 * Time: 18:42
 */
@RestController
public class UserController {
    @RequestMapping("/user/login1")
    public int login1() {
        return 1;
    }

    @RequestMapping("/user/login2")
    public Object login2() {
        ResultAjax resultAjax = new ResultAjax();
        resultAjax.setCode(200);
        resultAjax.setDate("1");
        resultAjax.setMes("");
        return resultAjax;
    }

    @RequestMapping("user/login3")
    public String login3() {
        return "登陆成功";
    }

    @RequestMapping("user/login4")
    public int login4() {
        Object obj = null;
        obj.hashCode();
        return 1;
    }

    @RequestMapping("/user/login5")
    public int login5() {
        int a = 2 / 0;
        System.out.println(a);
        return 1;
    }

    @RequestMapping("/user/login6")
    public int login6() {
        int[] array = new int[3];
        for(int i = 0; i < 4; i++) {
            array[i] = i;
        }
        return 1;
    }
}
